using System;
using Sce.PlayStation.Core;

namespace Nyanimals
{
	public abstract class CBaseObject
	{
		protected CStaticContext context;
		protected int contextIndex;
		
		public CBaseObject()
		{
			contextIndex = -1;
			context = null;
		}
		
		public virtual CBaseContext Context
		{
			get { return context;}
		}
		
		public virtual int ContextIndex
		{
			get { return contextIndex;}
			set
			{
				contextIndex = value;
				context = (CStaticContext)CContextManager.Instance.GetContext(contextIndex);
			}
		}
		public virtual Matrix4 WorldMatrix
		{
			get { return context.WorldMatrix;}
			set { context.WorldMatrix = value;}
		}
		
		public virtual ObjectTypes Type
		{
			get { return ObjectTypes.Base_Object;}
		}
		
        public abstract void Init();
        public abstract void Shutdown();
		public abstract void Input();
		public abstract void Update(float deltaTime);
		public abstract bool HandleCollision(ref CBaseObject Obj);
		
	}
}

